{% extends "_layout.html" %}
{% import "component/statistics.njk" as statistics %}

{# 样式代码 #}
{% block style %}
<title>统一出题-选择班级</title>
{% endblock %}

{# bodyd代码#}
{% block body %}
<div class="mui-content">
    <div class="mui-card">
        <form class="mui-input-group">
            {%for item in data%}
            <div class="mui-input-row mui-radio">
                <label>{{item.gradeName}}{{item.clazzName}}</label>
                <input name="radio1" value="{{item.schoolGradeId}}" data-id="{{item.id}}" data-cid="{{item.clazzId}}" type="radio" >
            </div>
            {%endfor%}
        </form>
    </div>
    <div class="mui-content-padded">
        <input type="submit" class="mui-btn mui-btn-block" value="下一步">
    </div>
</div>
{% endblock %}

{#js代码#}
{% block js %}
<script src="js/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script>
    $('.mui-content-padded input[type="submit"]').on('click',function(){
        let list = $('input[name="radio1"]:checked').val();
        sessionStorage.setItem('clazzId',$('input[name="radio1"]:checked').data("cid"));
        sessionStorage.setItem('teacherClazzId',$('input[name="radio1"]:checked').data("id"));
         window.location.replace('/arrhomework2?id='+list);
    })
</script>
<!--flotdemo-->
{% endblock %}
